package com.zyong.design.pattern.command.case1;

/**
 * @program: zyong-design-pattern
 * @ClassName: Invoker
 * @author: zyong
 * @create: 2024-03-25 23:59
 */
public class Invoker {
    private Command command;

    public void setCommand(Command command) {
        this.command = command;
    }

    public void executeCommand() {
        command.execute();
    }

    public void undoExecuteCommand() {
        command.undo();
    }
}
